package com.kgc.publiccommon.remote;

import com.kgc.publiccommon.util.ResponseMsg;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.Map;

public interface UserRemote {


    @RequestMapping("login")
    @ResponseBody
    ResponseMsg login(@RequestParam("name") String name, @RequestParam("password") String password, @RequestParam("checkCode") String checkCode);

    @RequestMapping("captcha")
    @ResponseBody
    String getCaptcha();  // 返回 Base64 编码的验证码图片

    @RequestMapping("logout")
    @ResponseBody
    ResponseMsg logout(@RequestBody Map<String, String> request);


    //根据用户id查询角色信息
    @RequestMapping("selectRoleById")
    @ResponseBody
    ResponseMsg selectRoleById(@RequestParam("id") int id);

    //获取所有用户
    @RequestMapping("selectAllUser")
    @ResponseBody
    ResponseMsg selectAllUser();

    @RequestMapping("selectUserByMap")
    @ResponseBody
    ResponseMsg selectUserByMap(@RequestBody Map<String,Object> map);
}
